package vn.bk.hotel.dialog;

import vn.bk.hotel.R;
import vn.bk.hotel.SearchByLandmark;
import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ChooseTypeHotelLandmark {
    private Dialog dialog;

    public ChooseTypeHotelLandmark(Context paramContext)
    {
      this.dialog = new Dialog(paramContext);
      this.dialog.setTitle(paramContext.getString(R.string.dialog_choose_type_hotel_title));
      View localView = View.inflate(paramContext, R.layout.dialog_choose_type, null);
      ListView localListView = (ListView)localView.findViewById(R.id.list_type);
      localListView.setAdapter(new ArrayAdapter<String>(paramContext, android.R.layout.simple_list_item_1, paramContext.getResources().getStringArray(R.array.type)));
      localListView.setOnItemClickListener(new AdapterView.OnItemClickListener()
      {
        public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
        {
          SearchByLandmark.changeTypeHotel(paramAnonymousInt);
          dialog.dismiss();
        }
      });
      this.dialog.setContentView(localView);
    }

    public void show()
    {
      this.dialog.show();
    }
}
